<?php
$this->start('toolbar');
echo $this->Html->link(
	'<i class="icon-edit icon-white"></i>&nbsp;'.__('Edit'),
	array('controller'=> 'tasks', 'action'=> 'edit', $task['Task']['id']),
	array('escape'=> false, 'class'=> 'btn btn-small btn-success')
);
echo $this->Html->link(
	'<i class="icon-circle-arrow-left"></i>&nbsp;'.__('Back'),
	'javascript:history.back()',
	array('escape'=> false, 'class'=> 'btn btn-small')
);

$this->end();
$dateFormat = Configure::read('Setting.date_format');
$taskStatuses = Configure::read('Constant.status_task');
?>
<div class="span6">	
<table class="table table-bordered">
	<tr>
		<td><?php echo __('Status') ?></td>
		<td><?php if(isset($taskStatuses[$task['Task']['status']])){
			echo $taskStatuses[$task['Task']['status']];
		}?></td>
	</tr>
	<tr>
		<td><?php echo __('Assigned To') ?></td>
		<td><?php echo $task['Recipient']['username'] ?></td>
	</tr>
	<tr>
		<td><?php echo __('Test') ?></td>
		<td><?php echo $task['Test']['name'] ?></td>
	</tr>
	<tr>
		<td><?php echo __('Question number') ?></td>
		<td><?php echo $task['Task']['question_number'] ?></td>
	</tr>
	<tr>
		<td><?php echo __('Progress') ?></td>
		<td><?php echo round($task['Task']['question_count']*100/$task['Task']['question_number'])."%" ?></td>
	</tr>
	<tr>
		<td><?php echo __('Start Date') ?></td>
		<td><?php echo $task['Task']['start_date']?$task['Task']['start_date']:'' ?></td>
	</tr>
	<tr>
		<td><?php echo __('Due Date') ?></td>
		<td><?php echo $task['Task']['due_date']?$task['Task']['due_date']:'' ?></td>
	</tr>
	<tr>
		<td><?php echo __('Created') ?></td>
		<td><?php echo $task['Task']['created'] ?></td>
	</tr>
</table>
</div>
<div class="row-fluid">
<div class="clearfix span12">
	<h4><?php echo __('List question')." :"?></h4>
	<?php echo $this->element('backend/question_grid', array('questions'=> $questions, 'displayAnswer'=> false, 'displayAuthor'=> true, 'displayFilter'=> false))?>
</div>
</div>
